import axios from 'axios';
import {ajax,base} from './config'

//约工列表
export const getappList = params => { return ajax.getMinData({url:`${base}api/appointment/getAppointmentByPage.do`, params}); };
//处理预约
export const dealAppointment = params => { return ajax.postData({url:`${base}appointmentController/doUpdate.do`, params}); };
//流程类别
export const getAllTypeForTree = params => { return ajax.getMinData({url:`${base}api/tbTacheTypeController/typeTree.do`, params}); };
//
export const appointmentDodel = params => { return ajax.getMinData({url:`${base}/api/appointment/doDel.do`, params}); };

// 约工管理
// 单位表格数据列表
export const departData = params => { return axios.post(`${base}outsourcingDeptController/datagrid.do`, params); };
// 单位表格删除
export const departDel = params => { return ajax.postData({url:`${base}outsourcingDeptController/doDel.do`, params}); };
// 单位表格录入
export const departAdd = params => { return ajax.postData({url:`${base}outsourcingDeptController/doAdd.do`, params}); };
// 单位表格编辑
export const departEdit = params => { return ajax.postData({url:`${base}outsourcingDeptController/doUpdate.do`, params}); };
// 人员表格数据列表
export const personData = params => { return axios.post(`${base}outsourcingPersonController/datagrid.do`, params); };
// 人员表格删除
export const personDel = params => { return ajax.postData({url:`${base}outsourcingPersonController/doDel.do`, params}); };
// 人员表格录入
export const personAdd = params => { return ajax.postData({url:`${base}outsourcingPersonController/doAdd.do`, params}); };
// 人员表格编辑
export const personEdit = params => { return ajax.postData({url:`${base}outsourcingPersonController/doUpdate.do`, params}); };
// 变电站
export const getSub = params => { return axios.post(`${base}/bsSubstationController/getList.do`, params); };
//预约进站
export const doSaveAppointment = params => { return ajax.postData({url:`${base}api/appointment/doSaveAppointment.do`, params}); };
//查看预约获取附件  api/appointment/getPhotosByAppointmentId.do
export const getPhotosByAppointmentId = params => { return ajax.getMinData({url:`${base}/api/appointment/getAppointmentById.do`, params}); };
// 进站人员
export const deptListWithPerson = params => { return ajax.getMinData({url:`${base}/outsourcingDeptController/deptListWithPerson.do`, params}); };
